﻿#include <iostream>
using namespace std;
void func(int a, int b, int c, int* max, int* min);
int main()
{
    int a1 = 13, b1 = 166, c1 = 3, m = 0,n = 0;
    func(a1, b1, c1, &m, &n);
    cout << "三个数中的最大值是" << m << ",最小值是" << n << endl;
}

void func(int a, int b, int c, int* max, int* min)
{
    *max = a > b ? a : b;
    *min = a < b ? a : b;
    *max = *max > c ? *max : c;
    *min = *min < c ? *min : c;
}